﻿using System;
using System.Text.RegularExpressions;

public class ParseUpcaseTag
{
    public static void Main()
    {
        Console.Write("Enter text: ");
        string text = Console.ReadLine();

        Console.WriteLine();
        string pattern = "<upcase>(.*?)</upcase>";
        string parsedText = Regex.Replace(text, pattern, m => m.Groups[1].Value.ToUpper());
        Console.WriteLine("Parsed text: {0}", parsedText);
    }
}